package com.ohxwj.modules.web.dao;

import com.ohxwj.modules.sys.dao.BaseDao;
import com.ohxwj.modules.web.entity.WebArticleEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * Created by Administrator on 2018-04-09.
 */
@Mapper
public interface WebArticleDao extends BaseDao<WebArticleEntity> {

    int updateStatus(@Param("id") int id, @Param("status") int status);

    WebArticleEntity loadNextArticle(Map<String, Object> map);

    int updateHit(@Param("id") int id);

    List<WebArticleEntity> searchArticles(Map<String, Object> map);

    int searchTotal(Map<String, Object> map);

    int insertArticle(WebArticleEntity webArticleEntity);

    void insertMenuArticle(@Param("menuId") int menuId, @Param("articleId") int articleId, @Param("labelId") int labelId);

    int updateArticleLabel(@Param("articleId") int articleId, @Param("labelId") int labelId);

    List<WebArticleEntity> queryArticleByLabelId(@Param("labelId") int labelId);

    List<WebArticleEntity> queryTeachers(Map<String, Object> map);

    int queryTeachersCount(Map<String, Object> map);
}
